/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Models;

import javax.faces.bean.ManagedBean;
import javax.faces.bean.RequestScoped;

/**
 *
 * @author Cyro
 */
@ManagedBean(name = "adminBean")
@RequestScoped
public class Admin {

    int id;
    String username;
    String password;
    String fullname;
    String address;
    String phone;
    int role;

    public Admin(int id, String username, String password, String fullname, String address, String phone, int role) {
        this.id = id;
        this.username = username;
        this.password = password;
        this.fullname = fullname;
        this.address = address;
        this.phone = phone;
        this.role = role;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getFullname() {
        return fullname;
    }

    public void setFullname(String fullname) {
        this.fullname = fullname;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public int getRole() {
        return role;
    }

    public void setRole(int role) {
        this.role = role;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

     public void edit(Admin ad){
        this.id = ad.id;
        this.username = ad.username;
        this.password = ad.password;
        this.fullname = ad.fullname;
        this.address = ad.address;
        this.phone = ad.phone;
    }
    /** Creates a new instance of Admin */
    public Admin() {
    }
}
